package Test;

import java.util.ArrayList;

import org.junit.Test;

import DBLayer.DBTrained;
import ModelLayer.Trained;

public class TestDBTrained
{
	DBTrained dbt = new DBTrained();
	ArrayList<Trained> tlist = dbt.getAllTrained(false);

	@Test
	public void testGetAllTrained() {
	    System.out.println("\nTrained size       : " + tlist.size() + "\n");
	}

	@Test
	public void testSearchTrainedID() {
		int id = 1;
		while(id <= tlist.size())
		{
			Trained t = dbt.searchTrainedID(id, false);
			System.out.println("TrainedID          : " + t.getTrainedID());
			System.out.println("Name               : " + t.getName());
			System.out.println("TrainingActivityID : " + t.getTrainingActivity().getTrainingActivityID());
			System.out.println("TrainingDayID      : " + t.getTrainingDay().getTrainingDayID());
			System.out.println("TrainerPerson ID   : " + t.getTrainingDay().getTrainer().getPersonID());
			System.out.println("Trainer Firstname  : " + t.getTrainingDay().getTrainer().getfName());
			System.out.println("Trainer Initialer  : " + t.getTrainingDay().getTrainer().getInitials());
			System.out.println("---------------------------------");
			id++;
		}
	}
}
